/*
 * Copyright (c) 2009 by unreserved.org.
 * All rights reserved.
 */

package org.unreserved.ladderplot;

/**
 * Interface implemented by text renderers for various types of
 * LadderPlot objects.
 */
public interface TextRenderer {
    /**
     * 
     * 
     * <p>Note that once render() returns, getHeight() is expected to
     * return the actual height of the rendered object (measured in
     * rows).
     */
    void render();
    
    /**
     * Returns height (number of rows) of the rendered object. This
     * method returns -1 until render ahs been invoked. After render()
     * the result must be the actual height.
     */
    int getHeight();
    
    /**
     * Render the object on the specified canvas starting at the
     * specified line number.
     */
    void print(TextCanvas canvas, int linenum);
}
